package com.practice.tkmybatis.service.impl;

import com.practice.tkmybatis.dao.UserEntity;
import com.practice.tkmybatis.mapper.UserMapper;
import com.practice.tkmybatis.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description : user service 实现类
 * @Author : asus
 * @Version : xxx
 * @Date : 2021/6/8 23:16
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;


    @Override
    public UserEntity findById(int id) {
        return userMapper.selectByPrimaryKey(1);
    }

    @Override
    public List<UserEntity> findAll() {
        return null;
    }

    @Override
    public void insert(UserEntity user) {
        userMapper.insertSelective(user);
    }

    @Override
    public void update(UserEntity user) {

    }

    @Override
    public void delete(UserEntity user) {

    }
}
